var NAVTREE =
[
  [ "nRF51 General Code Examples", "index.html", [
    [ "nRF51 General Code Examples", "index.html", [
      [ "Release Notes", "p_releasenotes.html", null ],
      [ "Third Party IDEs", "third_party_ides.html", null ]
    ] ],
    [ "Modules", "modules.html", [
      [ "Drivers", "group__nrf__drivers.html", [
        [ "ADNS2080 driver", "group__nrf__drivers__adns2080.html", null ],
        [ "Cherry 8x16 keyboard matrix driver", "group__nrf__drivers__cherry8x16.html", null ],
        [ "DS1624 digital temperature sensor driver", "group__nrf__drivers__ds1624.html", null ],
        [ "GPIO abstraction", "group__nrf__gpio.html", null ],
        [ "GPIOTE abstraction", "group__nrf__gpiote.html", null ],
        [ "MPU6050 gyro/accelerometer driver", "group__nrf__drivers__mpu6050.html", null ],
        [ "SDIO driver", "group__nrf__drivers__sdio.html", null ],
        [ "Simple UART driver", "group__nrf__drivers__simple__uart.html", null ],
        [ "Software controlled SPI Master driver", "group__lib__driver__spi__master.html", null ],
        [ "Software controlled TWI Master driver", "group__lib__driver__twi__master.html", null ],
        [ "Synaptics Touchpad driver.", "group__nrf__drivers__synaptics__touchpad.html", null ],
        [ "TEMP abstraction", "group__nrf__temperature.html", null ]
      ] ],
      [ "PCA10000 example projects", "group__nrf__examples__pca10000.html", [
        [ "Radio Receiver example", "group__nrf__dev__button__radio__rx__example.html", null ],
        [ "Radio Transmitter example", "group__nrf__dev__led__radio__tx__example.html", null ],
        [ "UART example", "group__uart__example__pca10000.html", null ]
      ] ],
      [ "PCA10001 example projects", "group__nrf__examples__pca10001.html", [
        [ "GPIO example", "group__gpio__example__pca10001.html", null ],
        [ "Radio Receiver example", "group__nrf__dev__led__radio__rx__example.html", null ],
        [ "Radio Transmitter example", "group__nrf__dev__button__radio__tx__example.html", null ],
        [ "UART example", "group__uart__example__pca10001.html", null ]
      ] ],
      [ "nRF6310 example projects", "group__nrf__examples__nrf6310.html", [
        [ "ADNS2080 mouse sensor example", "group__adns2080__example.html", null ],
        [ "Button debouncer example", "group__debouncer__example.html", null ],
        [ "Cherry 8x16 keyboard example", "group__cherry8x16__example.html", null ],
        [ "Example template", "group__nrf__templates__example.html", null ],
        [ "GPIO example", "group__gpio__example.html", null ],
        [ "GPIOTE example", "group__nrf__gpiote__example.html", null ],
        [ "Motor control example", "group__simple__motor__control.html", null ],
        [ "Non-volatile memory controller example", "group__flashwrite__example.html", null ],
        [ "PPI example code", "group__ppi__example.html", null ],
        [ "PWM analyzer example", "group__pwm__analyzer__example.html", null ],
        [ "PWM example", "group__pwm__example.html", null ],
        [ "Pin change usage example", "group__pin__change__int__example.html", null ],
        [ "RAM retention example", "group__ram__retention__example.html", null ],
        [ "Radio Receiver example", "group__nrf__dev__radio__rx__example.html", null ],
        [ "Radio Test example", "group__nrf__radio__test__example.html", null ],
        [ "Radio Transmitter example", "group__nrf__dev__radio__tx__example.html", null ],
        [ "Random Number Generator example", "group__rng__example.html", null ],
        [ "Real-time clock example", "group__rtc__example.html", null ],
        [ "SPI master loopback usage example", "group__spi__master__example.html", null ],
        [ "TWI SW Master example", "group__twi__sw__master__example.html", null ],
        [ "Temperature example", "group__temperature__example.html", null ],
        [ "Timer example", "group__nrf__dev__timer__example.html", null ],
        [ "UART example", "group__uart__example.html", null ],
        [ "nRf6350 Radio configuration example", "group__n_r_f6350__radio__configuration__example.html", null ]
      ] ]
    ] ],
    [ "Data Structures", "annotated.html", [
      [ "deb_t", "structdeb__t.html", null ]
    ] ],
    [ "Data Structure Index", "classes.html", null ],
    [ "Data Fields", "functions.html", null ],
    [ "File List", "files.html", [
      [ "nrf51/Board/nrf6310/blinky_example/main.c", "nrf6310_2blinky__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/debouncer_example/lib_debounce.c", null, null ],
      [ "nrf51/Board/nrf6310/debouncer_example/lib_debounce.h", null, null ],
      [ "nrf51/Board/nrf6310/debouncer_example/main.c", "nrf6310_2debouncer__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/ext_sensors/adns2080_example/main.c", "nrf6310_2ext__sensors_2adns2080__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/ext_sensors/adns2080_example/sdio_config.h", null, null ],
      [ "nrf51/Board/nrf6310/ext_sensors/cherry8x16_example/main.c", "nrf6310_2ext__sensors_2cherry8x16__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/flashwrite_example/main.c", "nrf6310_2flashwrite__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/gpiote_example/main.c", "nrf6310_2gpiote__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/nRF6350_radio_configuration_example/main.c", "nrf6310_2n_r_f6350__radio__configuration__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/nRF6350_radio_configuration_example/twi_master_config.h", null, null ],
      [ "nrf51/Board/nrf6310/pin_change_int_example/main.c", "nrf6310_2pin__change__int__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/ppi_example/main.c", "nrf6310_2ppi__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/pwm_analyzer/main.c", "nrf6310_2pwm__analyzer_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/pwm_example/main.c", "nrf6310_2pwm__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/radio_example/main_rx.c", "nrf6310_2radio__example_2main__rx_8c.html", null ],
      [ "nrf51/Board/nrf6310/radio_example/main_tx.c", "nrf6310_2radio__example_2main__tx_8c.html", null ],
      [ "nrf51/Board/nrf6310/radio_example/radio_config.c", null, null ],
      [ "nrf51/Board/nrf6310/radio_example/radio_config.h", null, null ],
      [ "nrf51/Board/nrf6310/radio_test_example/main.c", "nrf6310_2radio__test__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/radio_test_example/radio_test.c", null, null ],
      [ "nrf51/Board/nrf6310/radio_test_example/radio_test.h", null, null ],
      [ "nrf51/Board/nrf6310/ram_retention_example/main.c", "nrf6310_2ram__retention__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/rng_example/main.c", "nrf6310_2rng__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/rtc_example/main.c", "nrf6310_2rtc__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/simple_pwm_motor_control_example/main.c", "nrf6310_2simple__pwm__motor__control__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/spi_master_example/main.c", "nrf6310_2spi__master__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/spi_master_example/spi_master_config.h", null, null ],
      [ "nrf51/Board/nrf6310/temperature_example/main.c", "nrf6310_2temperature__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/template_project/main.c", "nrf6310_2template__project_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/timer_example/main.c", "nrf6310_2timer__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/twi_sw_master_example/main.c", "nrf6310_2twi__sw__master__example_2main_8c.html", null ],
      [ "nrf51/Board/nrf6310/twi_sw_master_example/twi_master_config.h", null, null ],
      [ "nrf51/Board/nrf6310/uart_example/main.c", "nrf6310_2uart__example_2main_8c.html", null ],
      [ "nrf51/Board/pca10000/button_radio_example/main_rx.c", "pca10000_2button__radio__example_2main__rx_8c.html", null ],
      [ "nrf51/Board/pca10000/button_radio_example/radio_config.c", null, null ],
      [ "nrf51/Board/pca10000/button_radio_example/radio_config.h", null, null ],
      [ "nrf51/Board/pca10000/led_radio_example/main_tx.c", "pca10000_2led__radio__example_2main__tx_8c.html", null ],
      [ "nrf51/Board/pca10000/led_radio_example/radio_config.c", null, null ],
      [ "nrf51/Board/pca10000/led_radio_example/radio_config.h", null, null ],
      [ "nrf51/Board/pca10000/uart_example/main.c", "pca10000_2uart__example_2main_8c.html", null ],
      [ "nrf51/Board/pca10001/blinky_example/main.c", "pca10001_2blinky__example_2main_8c.html", null ],
      [ "nrf51/Board/pca10001/button_radio_example/main_tx.c", "pca10001_2button__radio__example_2main__tx_8c.html", null ],
      [ "nrf51/Board/pca10001/button_radio_example/radio_config.c", null, null ],
      [ "nrf51/Board/pca10001/button_radio_example/radio_config.h", null, null ],
      [ "nrf51/Board/pca10001/led_radio_example/main_rx.c", "pca10001_2led__radio__example_2main__rx_8c.html", null ],
      [ "nrf51/Board/pca10001/led_radio_example/radio_config.c", null, null ],
      [ "nrf51/Board/pca10001/led_radio_example/radio_config.h", null, null ],
      [ "nrf51/Board/pca10001/uart_example/main.c", "pca10001_2uart__example_2main_8c.html", null ],
      [ "nrf51/Include/boards.h", null, null ],
      [ "nrf51/Include/common.h", null, null ],
      [ "nrf51/Include/compiler_abstraction.h", null, null ],
      [ "nrf51/Include/console.h", "console_8h.html", null ],
      [ "nrf51/Include/nrf.h", null, null ],
      [ "nrf51/Include/nrf_assert.h", "nrf__assert_8h.html", null ],
      [ "nrf51/Include/nrf_delay.h", null, null ],
      [ "nrf51/Include/nrf_gpio.h", null, null ],
      [ "nrf51/Include/nrf_gpiote.h", null, null ],
      [ "nrf51/Include/nrf_temp.h", null, null ],
      [ "nrf51/Include/simple_uart.h", "simple__uart_8h.html", null ],
      [ "nrf51/Include/spi_master.h", "spi__master_8h.html", null ],
      [ "nrf51/Include/system_nrf51.h", null, null ],
      [ "nrf51/Include/twi_master.h", "twi__master_8h.html", null ],
      [ "nrf51/Include/boards/nrf6310.h", null, null ],
      [ "nrf51/Include/boards/pca10000.h", null, null ],
      [ "nrf51/Include/boards/pca10001.h", null, null ],
      [ "nrf51/Include/boards/pca10003.h", null, null ],
      [ "nrf51/Include/ext_sensors/adns2080.h", "adns2080_8h.html", null ],
      [ "nrf51/Include/ext_sensors/cherry8x16.h", "cherry8x16_8h.html", null ],
      [ "nrf51/Include/ext_sensors/ds1624.h", "ds1624_8h.html", null ],
      [ "nrf51/Include/ext_sensors/mpu6050.h", "mpu6050_8h.html", null ],
      [ "nrf51/Include/ext_sensors/nRF6350.h", null, null ],
      [ "nrf51/Include/ext_sensors/sdio.h", "sdio_8h.html", null ],
      [ "nrf51/Include/ext_sensors/synaptics_touchpad.h", "synaptics__touchpad_8h.html", null ],
      [ "nrf51/Source/console/console.c", "console_8c.html", null ],
      [ "nrf51/Source/ext_sensors/adns2080/adns2080.c", null, null ],
      [ "nrf51/Source/ext_sensors/cherry8x16/cherry8x16.c", null, null ],
      [ "nrf51/Source/ext_sensors/ds1624/ds1624.c", null, null ],
      [ "nrf51/Source/ext_sensors/mpu6050/mpu6050.c", null, null ],
      [ "nrf51/Source/ext_sensors/nRF6350/nRF6350.c", null, null ],
      [ "nrf51/Source/ext_sensors/sdio/sdio.c", null, null ],
      [ "nrf51/Source/ext_sensors/synaptics_touchpad/synaptics_touchpad.c", null, null ],
      [ "nrf51/Source/nrf_assert/nrf_assert.c", null, null ],
      [ "nrf51/Source/nrf_delay/nrf_delay.c", null, null ],
      [ "nrf51/Source/simple_uart/simple_uart.c", null, null ],
      [ "nrf51/Source/spi_master/spi_master.c", null, null ],
      [ "nrf51/Source/templates/system_nrf51.c", null, null ],
      [ "nrf51/Source/twi_master/twi_hw_master.c", null, null ],
      [ "nrf51/Source/twi_master/twi_sw_master.c", null, null ]
    ] ],
    [ "Globals", "globals.html", null ]
  ] ]
];

function createIndent(o,domNode,node,level)
{
  if (node.parentNode && node.parentNode.parentNode)
  {
    createIndent(o,domNode,node.parentNode,level+1);
  }
  var imgNode = document.createElement("img");
  if (level==0 && node.childrenData)
  {
    node.plus_img = imgNode;
    node.expandToggle = document.createElement("a");
    node.expandToggle.href = "javascript:void(0)";
    node.expandToggle.onclick = function() 
    {
      if (node.expanded) 
      {
        $(node.getChildrenUL()).slideUp("fast");
        if (node.isLast)
        {
          node.plus_img.src = node.relpath+"ftv2plastnode.png";
        }
        else
        {
          node.plus_img.src = node.relpath+"ftv2pnode.png";
        }
        node.expanded = false;
      } 
      else 
      {
        expandNode(o, node, false);
      }
    }
    node.expandToggle.appendChild(imgNode);
    domNode.appendChild(node.expandToggle);
  }
  else
  {
    domNode.appendChild(imgNode);
  }
  if (level==0)
  {
    if (node.isLast)
    {
      if (node.childrenData)
      {
        imgNode.src = node.relpath+"ftv2plastnode.png";
      }
      else
      {
        imgNode.src = node.relpath+"ftv2lastnode.png";
        domNode.appendChild(imgNode);
      }
    }
    else
    {
      if (node.childrenData)
      {
        imgNode.src = node.relpath+"ftv2pnode.png";
      }
      else
      {
        imgNode.src = node.relpath+"ftv2node.png";
        domNode.appendChild(imgNode);
      }
    }
  }
  else
  {
    if (node.isLast)
    {
      imgNode.src = node.relpath+"ftv2blank.png";
    }
    else
    {
      imgNode.src = node.relpath+"ftv2vertline.png";
    }
  }
  imgNode.border = "0";
}

function newNode(o, po, text, link, childrenData, lastNode)
{
  var node = new Object();
  node.children = Array();
  node.childrenData = childrenData;
  node.depth = po.depth + 1;
  node.relpath = po.relpath;
  node.isLast = lastNode;

  node.li = document.createElement("li");
  po.getChildrenUL().appendChild(node.li);
  node.parentNode = po;

  node.itemDiv = document.createElement("div");
  node.itemDiv.className = "item";

  node.labelSpan = document.createElement("span");
  node.labelSpan.className = "label";

  createIndent(o,node.itemDiv,node,0);
  node.itemDiv.appendChild(node.labelSpan);
  node.li.appendChild(node.itemDiv);

  var a = document.createElement("a");
  node.labelSpan.appendChild(a);
  node.label = document.createTextNode(text);
  a.appendChild(node.label);
  if (link) 
  {
    a.href = node.relpath+link;
  } 
  else 
  {
    if (childrenData != null) 
    {
      a.className = "nolink";
      a.href = "javascript:void(0)";
      a.onclick = node.expandToggle.onclick;
      node.expanded = false;
    }
  }

  node.childrenUL = null;
  node.getChildrenUL = function() 
  {
    if (!node.childrenUL) 
    {
      node.childrenUL = document.createElement("ul");
      node.childrenUL.className = "children_ul";
      node.childrenUL.style.display = "none";
      node.li.appendChild(node.childrenUL);
    }
    return node.childrenUL;
  };

  return node;
}

function showRoot()
{
  var headerHeight = $("#top").height();
  var footerHeight = $("#nav-path").height();
  var windowHeight = $(window).height() - headerHeight - footerHeight;
  navtree.scrollTo('#selected',0,{offset:-windowHeight/2});
}

function expandNode(o, node, imm)
{
  if (node.childrenData && !node.expanded) 
  {
    if (!node.childrenVisited) 
    {
      getNode(o, node);
    }
    if (imm)
    {
      $(node.getChildrenUL()).show();
    } 
    else 
    {
      $(node.getChildrenUL()).slideDown("fast",showRoot);
    }
    if (node.isLast)
    {
      node.plus_img.src = node.relpath+"ftv2mlastnode.png";
    }
    else
    {
      node.plus_img.src = node.relpath+"ftv2mnode.png";
    }
    node.expanded = true;
  }
}

function getNode(o, po)
{
  po.childrenVisited = true;
  var l = po.childrenData.length-1;
  for (var i in po.childrenData) 
  {
    var nodeData = po.childrenData[i];
    po.children[i] = newNode(o, po, nodeData[0], nodeData[1], nodeData[2],
        i==l);
  }
}

function findNavTreePage(url, data)
{
  var nodes = data;
  var result = null;
  for (var i in nodes) 
  {
    var d = nodes[i];
    if (d[1] == url) 
    {
      return new Array(i);
    }
    else if (d[2] != null) // array of children
    {
      result = findNavTreePage(url, d[2]);
      if (result != null) 
      {
        return (new Array(i).concat(result));
      }
    }
  }
  return null;
}

function initNavTree(toroot,relpath)
{
  var o = new Object();
  o.toroot = toroot;
  o.node = new Object();
  o.node.li = document.getElementById("nav-tree-contents");
  o.node.childrenData = NAVTREE;
  o.node.children = new Array();
  o.node.childrenUL = document.createElement("ul");
  o.node.getChildrenUL = function() { return o.node.childrenUL; };
  o.node.li.appendChild(o.node.childrenUL);
  o.node.depth = 0;
  o.node.relpath = relpath;

  getNode(o, o.node);

  o.breadcrumbs = findNavTreePage(toroot, NAVTREE);
  if (o.breadcrumbs == null)
  {
    o.breadcrumbs = findNavTreePage("index.html",NAVTREE);
  }
  if (o.breadcrumbs != null && o.breadcrumbs.length>0)
  {
    var p = o.node;
    for (var i in o.breadcrumbs) 
    {
      var j = o.breadcrumbs[i];
      p = p.children[j];
      expandNode(o,p,true);
    }
    p.itemDiv.className = p.itemDiv.className + " selected";
    p.itemDiv.id = "selected";
    $(window).load(showRoot);
  }
}

